<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'list_user.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  <a href="save_book.jsp">增加图书</a>
  
  <br/>
    <table border="1">
    	<tr>
    	  <td>图书编号</td>
    	  <td>图书类型</td>
    	  <td>图书书名</td>
    	  <td>图书语言</td>
    	  <td>出版社</td>
    	  <td>出版年份</td>
    	  <td>作者</td>
    	  <td>价格</td>
    	  <td>馆内总库存</td>
    	  <td>馆内当前库存</td>
    	  <td>图书简介</td>
    	  <td>图书所在位置</td>
    	  
    	</tr>
    	<!-- 用EL表达式 进行循环输出 -->
    	<c:forEach var="books" items="${books}">
    	  <tr>
    	  	<td>${books.isbn}</td>
    	  	<td>${books.typeid}</td>
    	  	<td>${books.title}</td>
    	  	<td>${books.language}</td>
    	  	<td>${books.publisher}</td>
    	  	<td>${books.publish_year}</td>
    	  	<td>${books.author}</td>
    	    <td>${books.price} </td>
    	  	<td>${books.number}</td>
    	  	<td>${books.stock}</td>
    	  	<td>${books.digest}</td>
    	  	<td>${books.location}</td>
    	  	
    	  	 <td> 
    	  	  					<!-- 获取到ID -->
    	  	  <a href="book/deletebook.do?isbn=${books.isbn}">删除</a>
    	  	  <a href="book/prefindisbn.do?isbn=${books.isbn}">修改</a>
    	  	</td>
    	  </tr>
    	</c:forEach>
    </table>
  </body>
</html>
